package dada_rent_car;

/**
 * @author duyong
 * @version 1.0
 * @date 2019/10/21 18:33
 */

/**
 * 父类car
 */
public abstract  class Car {
    //id
    private int id;
    //名字
    private String name;
    //价格
    private int price;
    //载货量
    private int cargo_capacity;
    //载人量
    private  int passenger_capacity;
      //创建构造器并初始化变量
    public void Car(int id,String name,int price,int cargo_capacity,int passenger_capacity){
       this.id=id;
       this.name=name;
       this.price=price;
       this.cargo_capacity=cargo_capacity;
       this.passenger_capacity=passenger_capacity;
    }
    //父类提供一个打印方法
    public abstract void printf();

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getCargo_capacity() {
        return cargo_capacity;
    }

    public void setCargo_capacity(int cargo_capacity) {
        this.cargo_capacity = cargo_capacity;
    }

    public int getPassenger_capacity() {
        return passenger_capacity;
    }

    public void setPassenger_capacity(int passenger_capacity) {
        this.passenger_capacity = passenger_capacity;
    }
}
